#FROM docker.utpf.cn/platform/prometheus/busybox:latest
#FROM ubuntu:23.04

FROM docker.utpf.cn/public/alpine:3.18.4

RUN echo "https://mirrors.tuna.tsinghua.edu.cn/alpine/v3.19/main" > /etc/apk/repositories && echo "https://mirrors.tuna.tsinghua.edu.cn/alpine/v3.19/community" >> /etc/apk/repositories
RUN apk add --no-cache libcap openssh-client sshpass util-linux lshw

RUN echo 'hosts: files dns' >> /etc/nsswitch.conf

RUN set -ex && \
    mkdir -p /usr/bin /etc/categraf

COPY categraf  /usr/bin/categraf

COPY conf /etc/categraf/conf

COPY entrypoint.sh /entrypoint.sh

CMD ["/entrypoint.sh"]
